self.onmessage = ({data:[读,写,x,y,宽,高]})=>

  实高 = 高 * 2
  实宽 = 宽 * 2

  canvas = new OffscreenCanvas(实宽,实高) # 切图展示区域的大小
  #canvas.captureStream 24
  ctx = canvas.getContext("2d", {
    #alpha: false
    desynshronized: true
    #preserveDrawingBuffer:true
  })
  读.pipeThrough(
    new TransformStream({
      transform:(frame, controller) =>
        #console.log frame
        # https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/drawImage
        try
          ctx.drawImage(
            frame
            x
            y
            宽
            高
            0
            0
            实宽
            实高
          )
          controller.enqueue(
            new VideoFrame(
              canvas
              timestamp:frame.timestamp
            )
          )
        finally
          frame.close()
        return
    })
  ).pipeTo(写)
  return
